--[[
	specNumber;

		1 - Holy
		2 - Protection
		3 - Retribution
]]

function ccR_Paladin_HammerOfJustice(specNumber)
	-- Hammer/Fist of Justice
	if specNumber == nil then specNumber = ccrPlayerSpec() end
	local vUseHammerOfJustice = ccRS["Paladin_" .. specNumber .. "_UseHammerOfJustice"]
	local vSpellID

	if ccrPlayerHasTalent(105593) then
		-- Fist of Justice
		vSpellID = FIST_OF_JUSTICE
	else
		-- Hammer of Justice
		vSpellID = HAMMER_OF_JUSTICE
	end

	-- Some silly reason, We still need to use Hammer of Justice for the attack
	if vUseHammerOfJustice
	and SpellIsReady(vSpellID)
	and not ccrTargetIsBoss()
	then
		ccrCastAttack(HAMMER_OF_JUSTICE)
		return
	end
	return
end

function ccR_Paladin_SelflessHealer(specNumber)
	if specNumber == nil then specNumber = ccrPlayerSpec() end
	local vUseSelflessHealer = ccRS["Paladin_" .. specNumber .. "_UseSelflessHealer"]
	local vSelflessHealerHP = ccRS["Paladin_" .. specNumber .. "_SelflessHealerHP"]

	if ccrPlayerHasTalent(SELFLESS_HEALER)
	and vUseSelflessHealer
	and ccrPlayerHealth() <= vSelflessHealerHP
	and ccrPlayerHasBuffStacks(SELFLESS_HEALER, 3)
	and SpellIsReady(FLASH_OF_LIGHT)
	then
		ccrCast(FLASH_OF_LIGHT, "player")
		return
	end
	return
end

function ccR_Paladin_HolyAvenger()
	if ccrPlayerHasTalent(HOLY_AVENGER)
	and SpellIsReady(HOLY_AVENGER)
	and ccrPlayerIsInCombat()
	and ccrTargetIsWithinMeleeRange()
	then
		ccrCast(HOLY_AVENGER)
		return
	end
	return
end

--[[ 
	TODO

	Talent: 45 Eternal Flame
			45 Sacred Shield
			90 Holy Prism
			90 Lights Hammer
			90 Execution Sentence
]]
